﻿@model IEnumerable<IRIS.Models.Sponsor>

@{
    ViewBag.Title = "Sponsors";
}
    <table>
        <tr>
            <th>
                Nafn
            </th>
            <th>
                Lýsing
            </th>
            <th>
                Heimasíða
            </th>
        </tr>
    @if (Model.Count() > 0)
    { 
        foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.Name)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Description)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.URL)
                </td>
                 @if (User.IsInRole("Stjórnendur"))
                 {
                <td>
                    @Html.ActionLink("Breyta", "Edit", new { id = item.ID, delete = false }, null) |
                    @Html.ActionLink("Henda", "Edit", new { id = item.ID, delete = true }, null)
                </td>
                 }
            </tr>
        }
    }
    else
    {
        <p>Engir styrktaraðilar til að birta</p> 
    }
    </table>
